function [PC,LS] = readPhastConsScoresSingle(file)

% This function reads 'PhastCons' conservation scores of a sequence from 
% a .gff-file.
%
% PC  - PhastCons conservation scores.
% LS  - Label (gene/sequence) name associated with scores.

tabchar = char(9);
maxlength = 2000;

PC = cell(1,1);
LS = cell(1,1);

pcs = -12345*ones(1,maxlength);

gff = importdata(file);
ngff = length(gff);

ind = strfind(gff{1},tabchar);
LS{1} = gff{1}(1:ind(1)-1);

for j=1:ngff
  ind = strfind(gff{j},tabchar);

  if strcmp(gff{j}(ind(1)+1:ind(2)-1),'phastCons17way_mm8')==1
    loc = str2num(gff{j}(ind(3)+1:ind(4)-1));
    pcs(loc) = str2num(gff{j}(ind(5)+1:ind(6)-1));
  end

end

PC{1} = pcs;
